<?php
/* @var $this KeHoachDauThauController */
/* @var $model FormKeHoachDauThau */

$this->breadcrumbs = array(
    'Form Ke Hoach Dau Thaus' => array('index'),
    'Manage',
);

$this->menu = array(
    array('label' => 'List FormKeHoachDauThau', 'url' => array('index')),
    array('label' => 'Create FormKeHoachDauThau', 'url' => array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#form-ke-hoach-dau-thau-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Quản lý Form kế hoạch đấu thầu</h1>


<?php echo CHtml::link('Tìm kiếm nâng cao', '#', array('class' => 'search-button')); ?>
<div class="search-form" style="display:none">
    <?php $this->renderPartial('_search', array(
        'model' => $model,
    )); ?>
</div><!-- search-form -->

<?php $this->widget('bootstrap.widgets.TbGridView', array(
    'id' => 'form-ke-hoach-dau-thau-grid',
    'dataProvider' => $model->duyet(),
    'filter' => $model,
    'columns' => array(
        'id',
        'ten_ke_hoach',
        'quyet_dinh_phe_duyet',
        'chu_dau_tu',
        'tong_muc_dau_tu',
//        'danh_sach_du_an',
        /*
        'ngay_xuat_ban',
        'so_bao_dang',
        'tinh_trang_thong_tin',
        'ma_thong_tin',
        'thong_tin_chuyen_tien',
        'id_nguoi_tao',
        'ngay_tao',
        'id_nguoi_chinh_sua',
        'ngay_chinh_sua',
        'status',
        'da_thanh_toan',
        'tong_tien',
        'id_nguoi_duyet',
        'ngay_duyet',
        */
        array(
            'class' => 'bootstrap.widgets.TbButtonColumn',
            'template' => '{duyettin} {update} {delete}',
            'buttons' => array
            (
                'duyettin' => array
                (
                    'label' => 'Duyệt tin',
                    'icon' => 'bell',
                    'url' => 'Yii::app()->createUrl("kehoachdauthau/duyettin", array("id"=>$data->id))',
                    'options' => array(
                        'class' => 'btn btn-small duyettin',
                    ),
                ),

                'update' => array
                (
                    'label' => 'Cập nhật',
                    'icon' => 'pencil',
                    'url' => 'Yii::app()->createUrl("kehoachdauthau/update", array("id"=>$data->id))',
                    'options' => array(
                        'class' => 'btn btn-small capnhat',
                    ),
                ),
                'delete' => array
                (
                    'label' => 'Xóa',
                    'icon' => 'trash',
                    'url' => 'Yii::app()->createUrl("kehoachdauthau/delete", array("id"=>$data->id))',
                    'options' => array(
                        'class' => 'btn btn-small xoa',
                    ),
                ),
            ),
            'htmlOptions'=>array(
                'style'=>'width: 130px',
            ),
        ),
    ),
)); ?>
